package com.csyaonie.kotlin

fun main(){
    val list= listOf("Apple","banana","Orange","Pear","Grape","Wartermelon");
    val fruit= list.maxBy { it.length }
    println(fruit)
    val newList=list.filter { it.length<5 }.map { it.toUpperCase() }
    for(fruit in newList){
        println(fruit)
    }
    val anyRes=list.any { it.length<=5 }
    val allRes=list.all { it.length<=5 }
    println(anyRes)
    println(allRes)
}